import axios from "axios";
const request = axios.create({
  timeout: 5000,
  baseURL: "http://127.0.0.1:3000/api"
});

// 添加响应拦截器
request.interceptors.response.use(
  function(response) {
    if (response.status === 200) {
      return Promise.resolve(response.data);
    }
  },
  function(error) {
    return Promise.reject(error);
  }
);
export default request;
